<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<link rel="stylesheet" href="style.css" type="text/css" />
</head>
<body>
<br>
  <p class="style30">ระบบจัดการข้อมูลเบื้องต้น</p>
  <hr />
  <br>
<? require("../connectDB.php");

$sql = mysql_query("select  *  from project where project_id = '$id'");

while($result = mysql_fetch_array($sql))    { ?>
<form action="updateProject.php" method="post" name="edit">

<table cellpadding="5">

<TR>
<TD>ชื่อผลงาน</TD>
<TD> <input type="text" name="pname" value='<? echo $result["project_name"]; ?>'></TD>
</TR>
<TR>
<TD >ชื่อเจ้าของผลงาน</TD>
<TD> 
<input type="text" name="oname" value='<? echo $result["owner_name"]; ?>'>
</TD>
</TR>
<TR>
<TD >รหัสนักศึกษา</TD>
<TD> 
<input type="text" name="sid" value='<? echo $result["student_id"]; ?>'>
</TD>
</TR>
<TR>
<TD>สาขาวิชา</TD>
<TD> <input type="text" name="major" value='<? echo $result["major"]; ?>'></TD>
</TR>
<TR>
<TD >รายวิชา</TD>
<TD> 
<input type="text" name="subject" value='<? echo $result["subject"]; ?>'>
</TD>
</TR>
<TR>
<TD >อาจารย์ประจำวิชา</TD>
<TD> 
<input type="text" name="tname" value='<? echo $result["subject_teacher"]; ?>'>
</TD>
</TR>
<TR>
<TD >อีเมล์(E-mail)</TD>
<TD> 
<input type="text" name="mail" value='<? echo $result["email"]; ?>'>
</TD>
</TR>
<TR>
<TD >เฟสบุ๊ค(Facebook)</TD>
<TD> 
<input type="text" name="fb" value='<? echo $result["facebook"]; ?>'>
</TD>
</TR>
<TR>
<TD >รายละเอียดผลงาน</TD>
<TD> 
<textarea name="comment"><? echo $result["comment_text"]; ?></textarea>
</TD>
</TR>
<TR>
<TD >ประเภทผลงาน</TD>
<TD> 
<input type="text" name="type" value='<? echo $result["project_type"]; ?>'>
</TD>
</TR>
<TD >สถานะผลงาน</TD>
<TD> 
<input type="text" name="status" value='<? echo $result["project_status"]; ?>'>
</TD>
</TR>
<TR>
<td>
<input type="hidden" name="id" value='<? echo $result["project_id"]; ?>'>
</td>
<td> <input type="submit" name="btnOk" value="บันทึก" style="cursor=hand">&nbsp;<input type="button" name="btn" id="btn" value="ยกเลิก" onclick="window.location='manageProject.php'"></td>
</TR>
</table>
</form>
<? }

mysql_free_result($sql);
mysql_close($con); ?>
</BODY>
</HTML>
